package com.topc.participant.service;

import com.topc.base.model.PageParams;
import com.topc.base.model.PageResult;
import com.topc.participant.model.dto.QueryUserDto;
import com.topc.participant.model.dto.SaveUserDto;
import com.topc.participant.model.po.UserInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.topc.participant.model.vo.UserShowVo;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * <p>
 * 用户信息表 服务类
 * </p>
 *
 * @author itcast
 * @since 2024-01-25
 */
public interface IUserInfoService extends IService<UserInfo> {

    void logout(String userNumber);

    UserInfo getUserInfoByNumber(String number);

    void switchUserRole(Long oldRoleId,Long newRoleId);

    Boolean isHasRoleInUser(Long roleId);


    PageResult<UserShowVo> searchInfoByPage(PageParams pageParams, QueryUserDto queryUserDto);

    Long saveUserInfo(SaveUserDto saveUserDto);

    void updateUserStatus(String number, int status);

    List<String> getNameListByNumber(List<String> userNumbers);

    void updateUserPwd(String userNumber,String newPwd, String originPwd);

    void saveListByExcel(MultipartFile file);
}
